package pers.mihao.quickstream.common.util.scan;

import org.springframework.core.env.Environment;
import org.springframework.core.io.Resource;

import java.io.IOException;

/**
 * @author mihao
 * @since 2022/7/20
 */
public class CacheClassPathClassFileScanner extends ClassPathClassFileScanner {

    public CacheClassPathClassFileScanner() {
        super(new SimplePackageResolve());
    }

    public CacheClassPathClassFileScanner(Environment environment) {
        super(environment == null ? new SimplePackageResolve() :
                new SpringEnvironmentPackageResolve(environment));
    }

    @Override
    protected String getClassnameByResource(Resource resource) throws IOException {
        return super.getClassnameByResource(resource);
    }

    @Override
    protected Resource[] getResources(String basePackage) throws IOException {
        return super.getResources(basePackage);
    }
}
